﻿/********************************************************************************************************************
* Author:	Aris Michail																							*
* Email:	std03055@di.uoa.gr																						*
* Purpose:	This script is used in order to create the stored procedure "usp_category_getentitynames" that returns 	*
*			the names of all the entities from a category.															*
********************************************************************************************************************/

CREATE PROCEDURE [dbo].[usp_category_getentitynames]
	@categoryid bigint,
	@entityname nvarchar(50)
AS
	SELECT entities.name
	FROM entities
	WHERE entities.category = @categoryid and Entities.Name like @entityname
RETURN 0